<?php
/**
 * --------------------------------
 * # 测试框架相关流程的控制器
 * --------------------------------
 * 1. 时间：2019-02-19
 * --------------------------------
 */
namespace Application\Controller;

// 引入模块中的 TestAppTrait
use Application\Common\Traits\TestAppTrait as TestAppTrait;
// 引入框架中的 TestTrait
Traits('TestTrait');

class TestController extends BaseController
{
    use \TestTrait;
    use TestAppTrait;

    public function index()
    {
        Org('TestOrg');
        $test_org=new \TestOrg();
        $test_org->display();
        echo "<br>";

        Vendor('Test.TestVendor');
        $test_vendor=new \TestVendor();
        $test_vendor->display();
        echo "<br>";

        Org('TestAppOrg');
        $test_app_org=new \TestAppOrg();
        $test_app_org->display();
        echo "<br>";

        Vendor('Test.TestAppVendor');
        $test_app_vendor=new \TestAppVendor();
        $test_app_vendor->display();
        echo "<br>";

        $this->displayTrait();
        echo "<br>";
        $this->displayAppTrait();
        echo "<br>";

        app_test();
        echo "<br>";
    }
    public function return_result()
    {
        $this->success('操作正确',url('Index/index'));
    }
    public function ajax_result()
    {
        $this->ajaxReturn(['操作正确']);
    }
}
